## Warning: The dot-dot notation (`..count..`) was deprecated in ggplot2 3.4.0.
## ℹ Please use `after_stat(count)` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Most users from this sample, approx. 75% not churned by this
definition
# Plot histogram of churned with different colors for TRUE, FALSE, and NA
ggplot(metrics_df, aes(x = churned, fill = factor(churned))) +
geom_bar(color = "white") +
scale_fill_manual(values = c("darkgreen", "darkred", "gray")) +
labs(title = "Churned Histogram (365 Days Since Last Achievement)", x = "Churned Status", y = "Count")
Longest Streak Histogram
Most users have 4 or 5 days as their longest streak.
This sample approximates a roughly normal distribution.
ggplot(metrics_df, aes(x = longest_streak, fill = factor(longest_streak))) +
geom_bar(color = "white") +
labs(title = "Streak Histogram", x = "Longest Streak (in Days)", y = "Count")